#ifndef __BASE_FILE_UTIL_H_
#define __BASE_FILE_UTIL_H_

#include <string>
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>

#include "StringUtil.h"

namespace BASE{
	class FileUtil{
		public:
			static std::string joinFileName(const std::string & path, const std::string & fileName);

			static Strings splitext(const std::string & fileName);

			static bool mkdirs(const std::string & path, mode_t mode = 0777);

			static bool unlink(const std::string & path);

			static time_t getModifyTime(const std::string & fileName);

			static uint64_t getSize(const std::string & fileName);

			static bool exist(const std::string & fileName);

			static std::string readAll(const std::string & fileName);

			static bool writeAll(const std::string & fileName, const std::string & content);

	};
}

#endif
